#!/bin/sh
#
# HINDEXD:
#
# chkconfig:	2345 90 60
# description:  HINDEXD
#
#

# Source function library.
. /etc/rc.d/init.d/functions

#[ -r /etc/sysconfig/hindexd ] && . /etc/sysconfig/hindexd
HINDEXDARGS=" -d -c /usr/local/etc/hindexd.ini > /tmp/hindexd.log 2>&1 "

start() 
{
        echo -n $"Starting hindexd: "
        daemon /usr/local/sbin/hindexd $HINDEXDARGS

	touch /var/lock/subsys/hindexd
        echo
}

stop() 
{
        echo -n $"Shutting down hindexd: "
	killproc hindexd

	rm -f  /var/lock/subsys/hindexd
        echo
}

[ -f /usr/local/sbin/hindexd ] || exit 0

# See how we were called.
case "$1" in
  start)
	start
        ;;
  stop)
	stop
        ;;
  restart|reload)
	stop
	start
	;;
  condrestart)
	[ -e /var/lock/subsys/hindexd ] && (stop; start)
	;;
  status)
  	status hidd
	;;
  *)
        echo $"Usage: $0 {start|stop|restart|reload|condrestart}"
        exit 1
esac

exit 0
